from TTS.utils.manage import ModelManager


def chose_tts():
    # 创建模型管理器
    manager = ModelManager()

    # 获取所有支持的模型
    models = manager.list_models()

    # 打印可用模型
    for model in models:
        print(model)


def download_model():
    model_name = "tts_models/multilingual/multi-dataset/xtts_v2"

    # 指定下载路径
    model_path = "models/"

    # 创建模型管理器并下载模型
    manager = ModelManager()
    manager.download_model(model_name)

    print(f"模型已下载到 {model_path}")


if __name__ == "__main__":
    chose_tts()
